import { lazy } from 'react';
import type { RouteObject } from 'react-router-dom';

import lazyLoadComp from '@/router/lazyComp';

const NotFound = lazy(() => import('@/pages/exception/404'));
const Forbidden = lazy(() => import('@/pages/exception/403'));
const InternalError = lazy(() => import('@/pages/exception/500'));

const publicRouter: RouteObject[] = [
	{
		path: '/404',
		id: '404',
		element: lazyLoadComp(NotFound)
	},
	{
		path: '/403',
		id: '403',
		element: lazyLoadComp(Forbidden)
	},
	{
		path: '/500',
		id: '500',
		element: lazyLoadComp(InternalError)
	}
];

export default publicRouter;
